<?php

namespace app\shop\model;

use app\BaseModel;
use think\facade\Cache;
use think\Db;



//*------------------------------------------------------ */
//-- 订单表
/*------------------------------------------------------ */

class PrizeSetModel extends BaseModel
{
    protected $table = 'shop_prize_set';
    public $pk = 'id';
    protected $mkey = 'shop_goods_mkey_';
    public $config = [];

    public function initialize()
    {
        parent::initialize();
        $this->config = config('config.');
    }
    /*------------------------------------------------------ */
    //-- 清除缓存
    /*------------------------------------------------------ */
    public function cleanMemcache($order_id = 0)
    {
        Cache::rm($this->mkey . $order_id);
        Cache::rm($this->mkey . '_goods_' . $order_id);
        if ($this->userInfo['user_id'] > 0) {
            Cache::rm($this->mkey . '_user_stat_' . $this->userInfo['user_id']);
        }
    }

    /*------------------------------------------------------ */
    //-- 写入订单日志
    /*------------------------------------------------------ */
    function _log(&$order, $logInfo = '')
    {
        return OrderLogModel::_log($order, $logInfo);
    }




}
